#include <iostream>
#include <string>
#include <unordered_map>

using namespace std;


int main()
{
    unordered_map<string, int> mymap;
    mymap.insert(make_pair("koukou",100));
    mymap.insert(make_pair("jj",120));
    mymap.insert(make_pair("kk",150));
    // 重复插入相同的值是没有效果的
    mymap.insert(make_pair("jj",120));
    cout << "myset.size is :" << mymap.size() << endl;
    unordered_map<string, int>::iterator itr = mymap.find("koukou");
    cout << "itr->first is :"<< itr->first << "\nitr->second is:" << itr->second << endl;
    // find的返回值是一个迭代器(iterator)，如果找到了会返回指向目标元素的迭代器，没找到会返回end()
    mymap.erase("kk");
    cout << "erase later myset.size is :" << mymap.size() << endl;
    return 0;
}